{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->

		<section class="left-section">
			<dl id="leftNav" data-type="setting">
				<dt><i class="glyphicon glyphicon-wrench"></i> 网站设置</dt>
				{if in_case_array('admin/setting',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/setting/index}">站点设置</a></dd>
				{/if}
				{if in_case_array('admin/nav',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/nav/index}">导航设置</a></dd>
				{/if}
				{if in_case_array('admin/friendLink',$priv) || empty($priv)}
				<dd><a class="mb active" href="{url /admin/friendLink/index}">友情链接</a></dd>
				{/if}
				{if in_case_array('admin/remind',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/remind/index}">站内提醒</a></dd>
				{/if}
				{if in_case_array('admin/remindSms',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/remindSms/index}">短信提醒</a></dd>
				{/if}
				{if in_case_array('admin/security',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/security/index}">安全中心</a></dd>
				{/if}
				{if in_case_array('admin/remind',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/message/index}">消息中心</a></dd>
				{/if}
				{if in_case_array('admin/loginlog',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/LoginLog/index}">登录日志</a></dd>
				{/if}
				{if in_case_array('admin/operationlog',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/operationLog/index}">操作日志</a></dd>
				{/if}
			</dl>
		</section>

		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				{include admin.inc.bread}
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">

					<li ><a href="{url /admin/friendLink/add}"><i class="glyphicon glyphicon-plus"></i> 添加友情链接</a></li>
					<li><a href="{url /admin/friendLink/index}" ><i class="glyphicon glyphicon-th-list"></i> 友情链接列表</a></li>
					<li><a href="{$index_url}" ><i class="glyphicon glyphicon-th-list"></i> 分类列表</a></li>
					{if $id != ''}<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-edit"></i> 编辑分类</a></li>{/if}

				</ul>
				<div class="inner-container">
					<form role="form" class="content-add-form" id="content-add-form" autocomplete="off">

						<!--tmpl-fields-->

						<!-- input -->
						<div class="form-group">
							<label >
								<span class="asterisk">*</span>
								分类名称 
							</label>
							<input  dtype="" class="form-control" maxlength="20" name="data[name]" placeholder="分类名称" required cname="分类名称" value="{$item[name]}" />
						</div>
						<p class="help-block"></p>
						
						<!-- textarea -->
						<div class="form-group">
							<label>分类描述</label>
							<textarea class="form-control" maxlength="255" name="data[description]" placeholder="分类描述" cname="分类描述">{$item[description]}</textarea>
						</div>
						<p class="help-block"></p>
						
						<!-- select -->
						<div class="form-group">
							<label>父级分类</label>
							<select class="form-control m-bot15" id="inputparent_id" name="data[parent_id]">
								<option value="0">-- 请选择 --</option>
								{loop $parent_idoptions $v}
								<option {if $item[parent_id] == $v[id]}selected{/if} value="{$v[id]}">{$v[name]}</option>
								{/loop}
							</select>
						</div>
						<p class="help-block"></p>
						<div class="form-group">
							<label>操作人</label>
							<div class="col-sm-4" style="padding-top: 5px;">{$admin_name}</div>
						</div>
						<p class="help-block"></p>
						<!--tmpl-assocfields-->
						<div class="btn-group btn-group-or">
							<a href="{if $id==''}{$do_add_url}{else}{$do_edit_url}?id={$id}{/if}" class="btn btn-primary ajaxproxy"
								proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>

						</div>
					</form><!-- content add form -->
				</div>
			</div><!-- end of inner -->
		</section>
	</div>
</div>
{include admin.inc.footer}

<!--tmpl-script-->

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/setting_friendlink_cateadd",function (parameter){
		
		/**--tmpl-templatejavascript--**/
		
		<!--tmpl-templatejavascript-->
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();		
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}

		<li ><a class="assoc-page" data-page="{[page]}" {[if curr == page]}class="active"{[/if]} href="javascript:void(0)">{[page]}</a></li> 

		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>

</body>
</html>
